Skip to content

Unit Testing: Do no run in debug mode in order to reduce logging#13241

Merged
valentijnscholten merged 3 commits intodevfrom
Maffooch-patch-6
Nov 26, 2025
Merged

Unit Testing: Do no run in debug mode in order to reduce logging#13241
valentijnscholten merged 3 commits intodevfrom
Maffooch-patch-6

Conversation

@Maffooch
Copy link
Copy Markdown
Contributor

Viewing a failed test in the GHA logs is not very helpful without rendering the raw view because there are 50k+ lines of debug logs. Reducing the logging verbosity would make the tests quite a bit faster as well as finding failures easier in the GHA UI

Viewing a failed test in the GHA logs is not very helpful without rendering the raw view because there are 50k+ lines of debug logs. Reducing the logging verbosity would make the tests quite a bit faster as well as finding failures easier in the GHA UI
@valentijnscholten
Copy link
Copy Markdown
Member

When I look at the output of tests the biggest generators of output are the vcr related tests. Maybe a rerecording will reduce the output? There's also some dedupe and false positives history tests which put out lots of logging. Maybe those log statements can be commented out.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@Maffooch
Copy link
Copy Markdown
Contributor Author

Yep - they are debug logging the entire request 🥴 I would prefer to keep those logs in case someone needs them. not sure why the tests are ignoring the log level. Will make more time for this soon

@github-actions
Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

Maffooch added a commit that referenced this pull request Nov 20, 2025
Now that this feature has been live for a while, I think we can reduce the logging a bit. Noticed a lot of logs for this during #13241
@Maffooch Maffooch marked this pull request as ready for review November 20, 2025 22:31
@Maffooch Maffooch requested a review from mtesauro as a code owner November 20, 2025 22:31
Copy link
Copy Markdown
Member

@valentijnscholten valentijnscholten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we put a few lines in the docker readme on how to get DEBUG log output during unit tests?

@Maffooch
Copy link
Copy Markdown
Contributor Author

sure thing

@Maffooch
Copy link
Copy Markdown
Contributor Author

Should we put a few lines in the docker readme on how to get DEBUG log output during unit tests?

Turns out we have two docker compose override files: one for GHA and one for locally running tests that is still running in debug mode. The override specified in the docker docs is the latter option with debug mode enabled by default. I think we are fine to proceed with this PR as is

Copy link
Copy Markdown
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@valentijnscholten valentijnscholten added this to the 2.52.3 milestone Nov 21, 2025
valentijnscholten pushed a commit that referenced this pull request Nov 21, 2025
Now that this feature has been live for a while, I think we can reduce the logging a bit. Noticed a lot of logs for this during #13241
@valentijnscholten
Copy link
Copy Markdown
Member

sure thing

Sure Thing as in "Yes, I (Cody) will do that" or as in "I (Cody) happily wait for someone to do that".

I can try to deduce it from the PR, but not sure if both changes are needed and what their side effects are.

@valentijnscholten valentijnscholten modified the milestones: 2.52.3, 2.53.0 Nov 26, 2025
@valentijnscholten valentijnscholten merged commit e274d29 into dev Nov 26, 2025
152 checks passed
@Maffooch Maffooch deleted the Maffooch-patch-6 branch January 26, 2026 16:09
Maffooch added a commit to valentijnscholten/django-DefectDojo that referenced this pull request Feb 16, 2026
…3748)

Now that this feature has been live for a while, I think we can reduce the logging a bit. Noticed a lot of logs for this during DefectDojo#13241
Maffooch added a commit to valentijnscholten/django-DefectDojo that referenced this pull request Feb 16, 2026
…ectDojo#13241)

* Unit Testing: Do no run in debug mode in order to reduce logging

Viewing a failed test in the GHA logs is not very helpful without rendering the raw view because there are 50k+ lines of debug logs. Reducing the logging verbosity would make the tests quite a bit faster as well as finding failures easier in the GHA UI

* Remove verbosity from unit test commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants